package com.sc.highspeed.service;

import com.sc.highspeed.db.dao.UserRoleDao;
import com.sc.highspeed.db.model.UserRoleModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Admin on 2017/12/6.
 */
@Service
public class UserRoleService {

    @Autowired
    private UserRoleDao userRoleDao;

    public List<UserRoleModel> getUserRoleList() {
        return userRoleDao.getUserRoleList();
    }

    public UserRoleModel getUserRoleByUserId(int userId) {
        return userRoleDao.getUserRoleByUserId(userId);
    }

    public int insertUserRole(UserRoleModel userRoleModel) {
        return userRoleDao.insertUserRole(userRoleModel);
    }

    public int updateUserRoleByUserId(UserRoleModel userRoleModel) {
        return userRoleDao.updateUserRoleByUserId(userRoleModel);
    }

    public int deleteUserRoleByUserId(int userId) {
        return userRoleDao.deleteUserRoleByUserId(userId);
    }
}
